﻿<Window x:Class="Mar3ek.ColorHatTimeTracker.Windows.BreakdownsWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:amq="clr-namespace:AmCharts.Windows.QuickCharts;assembly=AmCharts.Windows.QuickCharts"
        xmlns:viewModels="clr-namespace:Mar3ek.ColorHatTimeTracker.ViewModels"
        Title="Colorhat - Time Breakdowns" Height="300" Width="850" WindowStartupLocation="CenterScreen" WindowStyle="ToolWindow">
    <Window.DataContext>
        <viewModels:BreakdownsViewModel />
    </Window.DataContext>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="Auto"></RowDefinition>
            <RowDefinition Height="*"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel Orientation="Horizontal" Grid.Row="0" Grid.ColumnSpan="3">
            <Label  Content="Time:" />
            <Label Content="{Binding TimeSpan}" />
        </StackPanel>
        <Label Content="By customer:" Grid.Row="1" Grid.Column="0" />
        <Label Content="By project:" Grid.Row="1" Grid.Column="1" />
        <Label Content="By service:" Grid.Row="1" Grid.Column="2" />
        <amq:PieChart Grid.Row="2" Grid.Column="0" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" IsManipulationEnabled="True" DataSource="{Binding BreakdownByCustomer}" TitleMemberPath="Value" ValueMemberPath="Key" />
        <amq:PieChart Grid.Row="2" Grid.Column="1" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" IsManipulationEnabled="True" DataSource="{Binding BreakdownByProject}" TitleMemberPath="Value" ValueMemberPath="Key" />
        <amq:PieChart Grid.Row="2" Grid.Column="2" HorizontalAlignment="Stretch" Margin="5" VerticalAlignment="Stretch" IsManipulationEnabled="True" DataSource="{Binding BreakdownByService}" TitleMemberPath="Value" ValueMemberPath="Key" />
    </Grid>
</Window>
